#include <Box2D/Box2D.h>
#include "QpwPhysics.h"
#include "QpwStaticObject.h"

using namespace QpwWorld;

StaticObject::StaticObject( const QpwSubType & subType,
    const QpwStyleDatabase & styleDatabase ) : DecorationObject( subType, styleDatabase )
{

    p_physicsData = 0;

}

StaticObject::~StaticObject() {
}

bool StaticObject::isValid() const {

    return DecorationObject::isValid() && p_physicsData;
}

void StaticObject::setPos( const QPointF & pos ) {

    if (p_physicsData)
        p_physicsData->body()->	SetTransform( b2Vec2( pos.x(), pos.y() ), 0 );

}
